package cn.ibdsr.human.util;

import javax.servlet.http.HttpServletRequest;

/**
 * @author: lvyou
 * @description:
 * @date: 2020-03-04
 * @lastModified:
 *
 * Date           Author               Description
 * ------------------------------------------------------
 * 2020-03-04     lvyou                修改记录
 */
public class RequestUtil {
    private static final ThreadLocal<HttpServletRequest> THREAD_REQUEST = new ThreadLocal<HttpServletRequest>();

    public static void setRequest(HttpServletRequest request) {
        THREAD_REQUEST.set(request);
    }

    public static HttpServletRequest getRequest() {
        return THREAD_REQUEST.get();
    }

    public static void remove() {
        THREAD_REQUEST.remove();
    }
}
